package com.cskaoyan.gateway.controller.shopping;

import com.mall.commons.result.ResponseData;
import com.mall.commons.result.ResponseUtil;
import com.mall.shopping.IContentService;
import com.mall.shopping.dto.NavListResponse;
import com.mall.user.annotation.Anoymous;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author : L
 * @ProjectName : pepsi
 * @Date : 1/24/2021
 * @Description :
 */
@RestController
public class ContentController {

    @Reference(check = false)
    IContentService contentService;

    @Anoymous
    @GetMapping("shopping/navigation")
    public ResponseData navigation() {
        NavListResponse navListResponse = contentService.queryNavList();
        return new ResponseUtil().setData(navListResponse.getPannelContentDtos());
    }
}
